<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8" isELIgnored="false"%>
<%@ include file="/WEB-INF/views/shared/taglib.jsp"%>
<%
	request.setAttribute("modelConfigPath", "cargo");
%>
<%@ include file="/WEB-INF/views/shared/master/contentHeader.jsp"%>


<div class="panel panel-white">
	<div class="panel-heading">
		<h6 class="panel-title">采购退货记录</h6>
	</div>
	<div class="table-responsive" style="height:400px">
		<table class="cntable table table-bordered  " >	
			<thead>
				<tr class="success" >
					<th style="width:50px">序号</th>
					<th style="width:120px">商品编码</th>
					<th style="width:120px">商品名称</th>
					<th style="width:120px">规格</th>
					<th style="width:120px">单位</th>
					<th style="width:120px">退货数</th>
				</tr>
			</thead>
			<tbody >
				<c:forEach var="inStockShow" items="${inStock.inStockShows}" varStatus="status">
					<c:forEach var="inStockcollocation" items="${inStockShow.inStockCollocations}" varStatus="status">
					<tr >
						<td>${status.index+1 }</td>
						<td>${inStockShow.cargo.cargoNo }</td>
						<td>${inStockShow.cargo.cargoName }</td>
						<td>${inStockcollocation.collocation.propertyNameOne }/${inStockcollocation.collocation.propertyNameTwo }</td>
						<td>${inStockShow.cargo.unit }</td>
											
						<td>
							${inStockcollocation.collocationNum }
						</td>
					</tr>
				</c:forEach>	
				</c:forEach>	
			</tbody>
			<tfoot >
				<tr style="height:20px" >
					<th colspan="8"> </th>
				</tr>
			</tfoot>
		</table>    
		<t:formgroup>
			<label  style="font-size:1.0em;margin-left:20px;">退货单号：${inStock.inStockNo }</label> 	
			<label  style="font-size:1.0em;margin-left:20px">入库仓：${inStock.warehouse }</label> 	
			<label  style="font-size:1.0em;margin-left:20px">经办人：${inStock.createUserName }</label> 
			<label  style="font-size:1.0em;margin-left:20px">退货日期：<fmt:formatDate value="${inStock.createDate}" type="date" dateStyle="default" pattern="YYYY-MM-dd HH:mm"/></label>
			<label  style="font-size:1.0em;margin-left:20px">备注：${inStock.comment }</label>  	
		</t:formgroup>
	</div>
</div>

<script type="text/javascript">

function saveData(lBtn){
	if (!$("form:first").valid()){
		return;
	}
	lBtn.start();
	$("form:first").submit();
}	

function toVoid(id){
	
	var url = $.getVirtualPath()+"/purchase/purchase/toVoid?key="+id;
	deleteDataEx(url, searchCallback);

}

function printer(inStockId){


	top.openModal("/purchase/purchase/inStockDetailPrint?key="+inStockId,"inStock_form","采购入库单打印",1200,450);
}
</script>
<%@ include file="/WEB-INF/views/shared/base/scripts/jqueryui.jsp"%>
<%@ include file="/WEB-INF/views/shared/base/scripts/limitless/default/formtags.jsp"%>
<%@ include file="/WEB-INF/views/shared/base/scripts/limitless/default/formbuttons.jsp"%>
<%@ include file="/WEB-INF/views/shared/base/scripts/limitless/default/formpickers.jsp"%>
<%@ include file="/WEB-INF/views/shared/base/scripts/limitless/default/formselects.jsp"%>
<%@ include file="/WEB-INF/views/shared/base/scripts/limitless/default/formstyling.jsp"%>
<%@ include file="/WEB-INF/views/shared/master/dialog.jsp"%>
<%@ include file="/WEB-INF/views/shared/master/contentFooter.jsp"%>
